package modules.pathloss;

import com.vividsolutions.jts.geom.Geometry;

import datatypes.Antenna;
import tools.settings.Settings;
import tools.settings.SettingsMissingException;

/**
 * An interface for the calculation of the Maximum Allowable Path Loss.
 *
 * @author Lynne Vandousselaere
 */
public interface MAPL {

    /**
     * <p>Calculates the coverage area of a given antenna. The coverage area is
     * the area where communication is possible with the antenna.</p>
     *
     * @param a 
     *      the antenna
     * @return 
     *      a Geometry object representing the coverage area.
     * @throws InvalidAttributesException
     *      if the Settings lack needed information.
     */
    Geometry getCoverage(Antenna a, Settings settings) throws SettingsMissingException;

    /**
     * <p>Calculates the radius where the electric field of the antenna is
     * measurable.</p>
     *
     * @param a
     *      the antenna
     * @return 
     *      the measure: range in meters.
     * @throws InvalidAttributesException
     *      if the Settings lack needed information.
     */
    double getRangeRadius(Antenna a, Settings settings) throws SettingsMissingException;

    /**
     * <p>Calculates the maximum path loss for a given antenna,
     * given settings and a given distance.</p>
     *
     * @param a
     *      the antenna
     * @param settings
     *      the (technology) settings
     * @param distance
     *      the
     * @return
     * @throws tools.settings.SettingsMissingException
     */
    //float getMAPL(Antenna a, Settings settings, double distance) throws SettingsMissingException;
}
